<%@page contentType="text/html; charset=UTF-8"%>
<%@taglib uri="/WEB-INF/struts-tags.tld" prefix="s"%>
<%@taglib uri="/WEB-INF/wm.tld" prefix="wm"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>外卖管理系统</title>
<link rel="stylesheet" href="/css/admin.css" type="text/css"/>
<script type="text/javascript" src="/js/jquery-1.6.1.min.js"></script>
</head>
<body leftmargin="2" topmargin="2">
<fieldset><legend>订单管理-查询参数选择：</legend>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
    <tr class="tdbg3" align="left"> 
	<form name="add" id="add" method="get" action="admin_orders.action">
   	 <td>
	 显示:
	 <s:select list="stateList" name="state" id="state" listKey="key" listValue="value"></s:select>
	<input value="查询" type="submit" /> 
	 </td>
	 </form>
    </tr>
</table>
</fieldset>

<s:url action="admin_city?action=add" id="cityaddurl" />
<fieldset><legend>订单管理：</legend>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  <COLGROUP>
  <COL width="*" />
  <COL width="100" />
  <COL width="200" />
  <COL width="100" />
  <COL width="100" />
  <COL width="100" />
  <tr style="font-weight: bold;" align="center" class="tdbg2"> 
    <td>联系人</td>
    <td>联系电话</td>
    <td>饭店名字</td>
    <td>总价</td>
    <td>状态</td>
    <td>管理操作</td>
  </tr>
<s:iterator id="o" value="%{pageList.objectList}" status="st" >
<s:url action="admin_orders?action=show&id=${o.id}" id="showurl" />
    <tr class="tdbg3" align="center"> 
      <td><s:property value="#o.linkMan"/></td>
      <td><s:property value="#o.phone"/></td>
      <td><s:property value="#o.resName"/></td>
      <td><s:property value="#o.totalPrice"/></td>
      <td>
      <s:if test="#o.state==0">
      	下单
      </s:if>
      <s:if test="#o.state==1">
      	饭店接单
      </s:if>
      <s:if test="#o.state==2">
      	送出
      </s:if>
      <s:if test="#o.state==3">
      	交易成功
      </s:if>
      </td>
      <td>
		<a href="${showurl}">查看</a>
      </td>
    </tr>
</s:iterator>
<tr align="center" class="tdbg2"> 
   <td colspan="6"><wm:pages value="%{pageList.pages}"/></td>
</tr>
</table>
</fieldset>
</body>
</html>
